interface UserStateSchema {
  userInfo: object | null
}

export default {
  namespaced: true,
  state: {
    userInfo: null
  },
  getters: {
    getUserInfo: (state: UserStateSchema) => state.userInfo
  },
  mutations: {
    setUserInfo: (state: UserStateSchema, userInfo: object | null) => {
      state.userInfo = userInfo
    }
  },
  actions: {
    setUserInfoAction: (store: any, userInfo: object | null) => {
      store.commit('setUserInfo', userInfo)
    }
  }
}
